import { $Http } from '@/config/service/http';

export enum Api {
  // 档案归档
  fileAudit = '/dms/archivesFile/audit', // 审核
  fileAuto = '/dms/archivesFile/autoProductFormInfo', // 自动生成表单
  fileClose = '/dms/archivesFile/closeFlow', // 关闭流程
  fileDelete = '/dms/archivesFile/delete', // 删除
  fileGet = '/dms/archivesFile/get', // 详情
  fileGetEachOther = '/dms/archivesFile/getEachOtherList', // 获取互见号下拉框
  fileFileName = '/dms/archivesFile/getFileListByFileName', // 根据档案名称获取已归档档案
  getFileListByFileName = '/dmsfile/commonFileInfo/getPublicFileByName', // 新根据档案名称获取已归档档案
  filePage = '/dms/archivesFile/page', // 分页查询
  fileReceive = '/dms/archivesFile/receive', // 接收
  fileRevoke = '/dms/archivesFile/revoke', // 撤回
  fileSave = '/dms/archivesFile/save', // 保存
  // 档案归档文件详情
  fileInfoImport = '/dms/archivesFileInfoFileinfo/importFile', // 导入
  fileGetImportTemplate = '/dms/template/getImportTemplate', // 下载导入模板
  fileInfoPage = '/dms/archivesFileInfoFileinfo/page', // 文件列表分页查询
  // 待存档列表
  fileByName = '/dmsfile/publicFileProcessOrder/findFileByName', // 查询已生效文件
  findListByBoxId = '/dms/archivesFileList/findDataByBoxId', // 通过档案盒id和卷号补充数据
  findListGet = '/dms/archivesFileList/get', // 详情
  findListByFileName = '/dms/archivesFileList/getWaitInputFileByFileName', // 根据档案名称获取已归档档案
  findListImportFile = '/dms/archivesFileList/importFile', // 导入
  fileListInput = '/dms/archivesFileList/inputConfirmation', // 录入确认
  fileListPage = '/dms/archivesFileList/page', // 待存档录入分页查询
  fileListSelect = '/dms/archivesFileList/selectList' // 查询多个详情
}

export const fileAudit = (params) => {
  return $Http.api(Api.fileAudit, params, 'post');
};

export const fileAuto = () => {
  return $Http.api(Api.fileAuto, null, 'post');
};

export const fileClose = (params) => {
  return $Http.api(Api.fileClose, params, 'post');
};

export const fileDelete = (params) => {
  return $Http.api(Api.fileDelete, params, 'post');
};

export const fileGet = (id) => {
  return $Http.api(`${Api.fileGet}/${id}`, null, 'get');
};

export const fileGetEachOther = (params) => {
  return $Http.api(Api.fileGetEachOther, params, 'post');
};

export const filePage = (params) => {
  return $Http.api(Api.filePage, params, 'post');
};

export const fileReceive = (params) => {
  return $Http.api(Api.fileReceive, params, 'post');
};

export const fileRevoke = (params) => {
  return $Http.api(Api.fileRevoke, params, 'post');
};

export const fileSave = (params) => {
  return $Http.api(Api.fileSave, params, 'post');
};

export const findListByBoxId = (params) => {
  return $Http.api(Api.findListByBoxId, params, 'post');
};

export const fileListInput = (params) => {
  return $Http.api(Api.fileListInput, params, 'post');
};

export const fileListPage = (params) => {
  return $Http.api(Api.fileListPage, params, 'post');
};

export const fileListSelect = (params) => {
  return $Http.api(Api.fileListSelect, params, 'post');
};
